[android] showing dialog while loading layout by setContentView in background

Posted by Maneesh on Stack Overflow See other posts from Stack Overflow or by Maneesh
Published on 2010-04-15T12:43:43Z Indexed on 2010/04/16 5:43 UTC
Read the original article Hit count: 227

Filed under:
|

I am using below code where , i want to show dialog in front and loading content in background but not able to do the same . Please advise.

dialog = ProgressDialog.show(this, "", "Loading. Please wait...", true);
runOnUiThread(new Runnable(){
  public void run() {
    setContentView(R.layout.main_layout);
    dialog.dismiss();
  }
});

© Stack Overflow or respective owner

Related posts about android

Related posts about android-emulator